<template>
  <Divider>标签页</Divider>
  <sh-tabs v-model="current" :tab-list="tabList" hasIcon verify show-return @pane-click="paneClick">
    <template #description>
      <sh-description :schema="formSchema" :data="dataSource" />
    </template>
    <template #empty></template>
    <template #extra>
      <Button>保存</Button>
      <Button type="primary">下一步</Button>
    </template>
  </sh-tabs>
</template>

<script setup>
import { ref } from 'vue';
import { useData } from './data/desctiption';

const { formSchema, dataSource } = useData();

const current = ref('description');
const tabList = [
  {
    label: '详情信息',
    name: 'description',
    saved: true,
  },
  {
    label: '空信息',
    name: 'empty',
  },
  {
    label: '未保存',
    name: 'unSaved',
  },
];

const paneClick = name => {
  console.log(name);
};
</script>
